/**
 * 
 */
package server;

/**
 * @author Machado
 *
 */
public class DispatcherChecker implements Runnable {
	
	private Dispatcher dispatcher;

	public DispatcherChecker(Dispatcher d) {
		this.dispatcher = d;
		
	}

	/* (non-Javadoc)
	 * @see java.lang.Runnable#run()
	 */
	@Override
	public void run() {
		while(dispatcher.isAlive()){
			dispatcher.clientAlive();
			try {
				Thread.sleep(20000);
			} catch (InterruptedException e) {
				e.printStackTrace();
				continue;
			}
		}
		
	}
	
	

}
